package com.niit.session16.generic;

public class Phone {
	private String model;
	private double price;
	private String properties;
	/**
	 * 打印这个类里所有信息
	 */
//	public void show() {
//		System.out.println("品牌："+model+",价格："+price+",参数："+properties);
//	}
	
//	alt+shift+s选择Generate toString()
//	toString()方法重写自Object类，用于打印这个类所有的信息
	@Override
	public String toString() {
		return "Phone [model=" + model + ", price=" + price + ", properties=" + properties + "]";
	}


	public Phone(String model, double price, String properties) {
		super();
		this.model = model;
		this.price = price;
		this.properties = properties;
	}

	public Phone() {
		super();
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getProperties() {
		return properties;
	}

	public void setProperties(String properties) {
		this.properties = properties;
	}

}
